/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * PrincipalFrame.java
 *
 * Created on 13/06/2011, 13:27:46
 */
package kinema;

/**
 *
 * @author Rafael
 */
public class PrincipalFrame extends javax.swing.JFrame {

    /** Creates new form PrincipalFrame */
    public PrincipalFrame() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlLeft = new javax.swing.JPanel();
        lblImagem = new javax.swing.JLabel();
        lblBemVindo = new javax.swing.JLabel();
        btnSair = new javax.swing.JButton();
        menuHeader = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenu2 = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setName("PrincipalFrame"); // NOI18N
        setResizable(false);
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowOpened(java.awt.event.WindowEvent evt) {
                formWindowOpened(evt);
            }
        });
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        pnlLeft.setBackground(java.awt.Color.gray);
        pnlLeft.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        pnlLeft.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        lblImagem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/kinema/resources/milky64/47.png"))); // NOI18N
        pnlLeft.add(lblImagem, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 30, -1, -1));

        lblBemVindo.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        lblBemVindo.setForeground(new java.awt.Color(255, 255, 255));
        lblBemVindo.setText("<html>Bem vindo(a)<br>Rafael Aguiar!</html>");
        pnlLeft.add(lblBemVindo, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 100, 90, 40));

        btnSair.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N
        btnSair.setText("Sair");
        btnSair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSairActionPerformed(evt);
            }
        });
        pnlLeft.add(btnSair, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 560, 130, -1));

        getContentPane().add(pnlLeft, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, -20, 150, 620));

        jMenu1.setText("File");
        menuHeader.add(jMenu1);

        jMenu2.setText("Edit");
        menuHeader.add(jMenu2);

        setJMenuBar(menuHeader);

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-816)/2, (screenSize.height-638)/2, 816, 638);
    }// </editor-fold>//GEN-END:initComponents

    private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowOpened
        lblBemVindo.setText("Bem vindo(a)");
    }//GEN-LAST:event_formWindowOpened

    private void btnSairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSairActionPerformed
        new LoginFrame().setVisible(true);
        this.dispose();
// TODO add your handling code here:
    }//GEN-LAST:event_btnSairActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new PrincipalFrame().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnSair;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JLabel lblBemVindo;
    private javax.swing.JLabel lblImagem;
    private javax.swing.JMenuBar menuHeader;
    private javax.swing.JPanel pnlLeft;
    // End of variables declaration//GEN-END:variables
}
